/**
 * @author xuyh0817
 * @email xuyh0817@foxmail.com
 * @date 2022-02-16 01:41
 * @version 2.0.0
 * @doc todo
 * @website todo
 * @remark  如果要分发源码，需在本文件顶部保留此文件头信息！！
 */
import { COMPONENT_TYPE } from '../../constants'

export default [
  {
    id: '1',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'value',
      rules: [],
      label: '默认值',
      extra: 'value(v-model) 数组形式(String[] Number[])',
    },
    attrs: {
      value: '[]',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入默认值'
    }
  },
  {
    id: '2',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'allowClear',
      rules: [],
      label: '清除图标',
      extra: '支持清除',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '3',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'showSearch',
      rules: [],
      label: '搜索',
      extra: '使单选模式可搜索',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '4',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'showArrow',
      rules: [],
      label: '下拉箭头',
      extra: '是否显示下拉小箭头',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '5',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'disabled',
      rules: [],
      label: '禁用状态',
      extra: '是否禁用状态，默认为 false,整组失效',
    },
    attrs: {
      checked: false
    }
  },
  {
    id: '6',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'defaultActiveFirstOption',
      rules: [],
      label: '默认高亮',
      extra: '是否默认高亮第一个选项',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '7',
    type: COMPONENT_TYPE.SWITCH,
    formItem: {
      prop: 'autoClearSearchValue',
      rules: [],
      label: '选中清空',
      extra: '是否在选中项后清空搜索框',
    },
    attrs: {
      checked: true
    }
  },
  {
    id: '8',
    type: COMPONENT_TYPE.INPUT_NUMBER,
    formItem: {
      prop: 'maxTagCount',
      rules: [],
      label: '显示tag',
      extra: '最多显示多少个 tag',
    },
    attrs: {
      value: 1,
      min: 1,
      placeholder: '请输入显示tag'
    }
  },
  {
    id: '9',
    type: COMPONENT_TYPE.RADIO_BUTTON,
    formItem: {
      prop: 'size',
      rules: [],
      label: '控件大小',
      extra: '控件大小。注：标准表单内的输入框大小限制为 large。可选 large default small ',
    },
    attrs: {
      value: 'default',
      buttonStyle: 'solid',
      children: [
        {
          value: 'large',
          label: 'large'
        },
        {
          value: 'default',
          label: 'default'
        },
        {
          value: 'small',
          label: 'small'
        }
      ]
    }
  },
  // {
  //     type: COMPONENT_TYPE.INPUT,
  //     formItem: {
  //         layout: {
  //             span: 24,
  //             offset: 0
  //         },
  //         prop: 'tokenSeparators',
  //         rules: [],
  //         label: '分词分隔符',
  //         extra: '自动分词的分隔符',
  //         labelCol: {
  //             span: 6,
  //             offset: 0
  //         },
  //         wrapperCol: {
  //             span: 18,
  //             offset: 0
  //         }
  //     },
  //     attrs: {
  //         value: "[]",
  //         maxLength: 100,
  //         type: 'text',
  //         allowClear: true,
  //         placeholder: '请输入分词分隔符'
  //     }
  // },
  {
    id: '10',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'notFoundContent',
      rules: [],
      label: '无数据内容',
      extra: '当下拉列表为空时显示的内容',
    },
    attrs: {
      value: '未找到数据',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请输入'
    }
  },
  {
    id: '11',
    type: COMPONENT_TYPE.INPUT,
    formItem: {
      prop: 'placeholder',
      rules: [],
      label: '默认文字',
      extra: '选择框默认文字',
    },
    attrs: {
      value: '请选择',
      maxLength: 100,
      type: 'text',
      allowClear: true,
      placeholder: '请选择'
    }
  },
  {
    id: '12',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'children',
      rules: [],
      label: '可选项',
      extra: '指定可选项,可用setFormItemAttrs方法进行动态设置',
    },
    attrs: {
      autoSize: {
        minRows: 6
      },
      value: '',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入可选项'
    }
  },
  {
    id: '13',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'associations',
      rules: [],
      label: '关联赋值',
      extra: '指定可选项中的属性项,进行动态添加到表单数据中',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入关联赋值项'
    }
  },
  {
    id: '14',
    type: COMPONENT_TYPE.TEXTAREA,
    formItem: {
      prop: 'groupLabelStyle',
      rules: [],
      label: 'label样式',
      extra: '分组label样式',
    },
    attrs: {
      autoSize: {
        minRows: 4
      },
      value: '',
      maxLength: 1000,
      allowClear: true,
      placeholder: '请输入分组label样式'
    }
  }
]
